package com.ruoyi.oauth.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 客户端对象 oauth_client
 *
 * @author ruoyi
 * @date 2024-01-31
 */
public class OauthClient extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 应用名称
     */
    @Excel(name = "应用名称")
    private String clientName;

    /**
     * 客户端ID
     */
    @Excel(name = "客户端ID")
    private String clientId;

    /**
     * 客户端密钥
     */
    @Excel(name = "客户端密钥")
    private String clientSecret;

    /**
     * 权限范围
     */
    @Excel(name = "权限范围")
    private String scope;

    /**
     * 授权模式
     */
    @Excel(name = "授权模式")
    private String grantTypes;

    /**
     * 客户端重定向URI
     */
    @Excel(name = "客户端重定向URI")
    private String redirectUri;

    /**
     * 访问令牌的有效时间(分钟)
     */
    @Excel(name = "访问令牌的有效时间(分钟)")
    private Long accessValidity;

    /**
     * 刷新令牌的有效时间(分钟)
     */
    @Excel(name = "刷新令牌的有效时间(分钟)")
    private Long refreshValidity;

    /**
     * 状态
     */
    @Excel(name = "状态")
    private String status;

    public void setClientName(String clientName) {
        this.clientName = clientName;
    }

    public String getClientName() {
        return clientName;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

    public String getClientId() {
        return clientId;
    }

    public void setClientSecret(String clientSecret) {
        this.clientSecret = clientSecret;
    }

    public String getClientSecret() {
        return clientSecret;
    }

    public void setScope(String scope) {
        this.scope = scope;
    }

    public String getScope() {
        return scope;
    }

    public void setGrantTypes(String grantTypes) {
        this.grantTypes = grantTypes;
    }

    public String getGrantTypes() {
        return grantTypes;
    }

    public void setRedirectUri(String redirectUri) {
        this.redirectUri = redirectUri;
    }

    public String getRedirectUri() {
        return redirectUri;
    }

    public void setAccessValidity(Long accessValidity) {
        this.accessValidity = accessValidity;
    }

    public Long getAccessValidity() {
        return accessValidity;
    }

    public void setRefreshValidity(Long refreshValidity) {
        this.refreshValidity = refreshValidity;
    }

    public Long getRefreshValidity() {
        return refreshValidity;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatus() {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("clientName", getClientName())
                .append("clientId", getClientId())
                .append("clientSecret", getClientSecret())
                .append("scope", getScope())
                .append("grantTypes", getGrantTypes())
                .append("redirectUri", getRedirectUri())
                .append("accessValidity", getAccessValidity())
                .append("refreshValidity", getRefreshValidity())
                .append("status", getStatus())
                .append("createTime", getCreateTime())
                .append("createBy", getCreateBy())
                .append("updateTime", getUpdateTime())
                .append("updateBy", getUpdateBy())
                .toString();
    }
}
